import os
import pytz
import datetime

class Env(object):
    def __init__(self):
        self.PHILLY_SRC_ROOT = os.path.dirname(os.path.abspath(__file__))
        self.PHILLY_ROOT = os.path.join(self.PHILLY_SRC_ROOT, os.pardir)
        self.PHILLY_SETTINGS_FILE = os.path.join(self.PHILLY_ROOT, '.philly/settings.json')
        self.CUR_DIR = os.getcwd()
        tz = pytz.timezone('Asia/Shanghai')
        self.CUR_TIME = datetime.datetime.now(tz)
        self.CUR_DATE_STR = self.CUR_TIME.strftime("%Y%m%d")
        self.CUR_TIME_STR = self.CUR_TIME.strftime("%Y%m%d-%H%M%S")
    
    def log_env(self):
        print('PHILLY_ROOT: {}'.format(self.PHILLY_ROOT))
        print('PHILLY_SETTINGS_FILE: {}'.format(self.PHILLY_SETTINGS_FILE))
        print('CUR_DIR: {}'.format(self.CUR_DIR))


if __name__ == '__main__':
    env = Env()
    print(env.PHILLY_ROOT)